<template>
  <div>
    <c-section v-loading="dataLoading" title="门店建设基础信息">
      <c-list :column="3">
        <c-list-item label="门店建设项目号" :value="detailData.constCode" />
        <c-list-item label="门店建设整体进度" dict-type-code="BEFORE_CONST_SCHEDULE" :value="detailData.constSchedule" />
        <c-list-item label="门店" :value="detailData.shopName" />
        <c-list-item label="所属客户" :value="detailData.clientName" />
        <c-list-item label="所属办事处" :value="detailData.officeName" />
        <c-list-item label="门店类型" dict-type-code="SHOP_TYPE" :value="detailData.shopType" />
        <c-list-item label="门店业务类型" dict-type-code="BIZ_TYPE" :value="detailData.shopBizType" />
        <c-list-item label="门店城市级别" dict-type-code="CITY_LEVEL" :value="detailData.shopCityLevel" />
        <c-list-item label="门店市场级别" dict-type-code="MARKET_LEVEL" :value="detailData.shopMarketLevel" />
        <c-list-item label="门店详细地址" :value="detailData.shopAddress" />
        <c-list-item label="报图类型" dict-type-code="MARKET_TYPE" :value="detailData.marketType" />
        <c-list-item label="门店建设类型" dict-type-code="CONST_TYPE" :value="detailData.constType" />
        <c-list-item label="商家类别" dict-type-code="BIZMAN_TYPE" :value="detailData.bizmanType" />
        <c-list-item label="装修形式" dict-type-code="DECORATION_FORM" :value="detailData.decorationForm" />
        <c-list-item label="装修范围" dict-type-code="DECORATION_RANGE" :value="detailData.decorationRange" />
        <c-list-item label="是否交接市场" :value="detailData.isHandover===1?'是':'否'" />
        <c-list-item label="交接前门店" :value="detailData.beforeShopName" />
        <c-list-item label="交接前门店建设整体进度" dict-type-code="BEFORE_CONST_SCHEDULE" :value="detailData.beforeConstSchedule" />
        <c-list-item label="市场交接时间" :value="detailData.handoverTime" />

      </c-list>
    </c-section>
  </div>
</template>
<script>
import { getConstData } from '@/api/common'
export default {
  name: 'MapApply',
  props: {
    constCode: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      dataLoading: false,
      detailData: {}
    }
  },
  watch: {
    constCode: {
      handler(v) {
        this.dataLoading = true
        getConstData(v).then(res => {
          if (res.success === 1 && res.data.records.length > 0) {
            this.detailData = res.data.records[0]
            this.dataLoading = false
          }
        }).catch(() => {
          this.dataLoading = false
        })
      },
      immediate: true
    }
  },
  created() {},
  methods: {}
}
</script>
<style lang="scss" scoped>
</style>
